<?php

/**
 * G PHP Framework
 * 
 * This is a PHP Framework created by me for learning OOP.
 * 
 * @author Steffen Brem
 * @version v0.1
 */

/**
 * Set the environment for the framework
 * 
 * - development (display all errors)
 * - production (hide all errors)
 */
define('ENVIRONMENT', 'development');

switch ( ENVIRONMENT )
{
    case 'development':
        error_reporting(E_ALL);
    break;
    case 'production':
        error_reporting(0);
    break;
    default:
        die('Your application environment is not set correctly.');
}

/**
 * Path to your system folder
 */
$systemPath = 'system';

/**
 * Path to your application folder
 */
$applicationPath = 'application';

/**
 * Path to the public folder
 */
$publicPath = 'public';


if ( realpath($systemPath) !== FALSE )
{
    $systemPath = realpath($systemPath).'/';
}
else
{
    die('Your system folder path is not set correctly.');
}

if ( realpath($applicationPath) !== FALSE )
{
    $applicationPath = realpath($applicationPath).'/';
}
else
{
    die('Your application folder path is not set correctly.');
}

if ( realpath($publicPath) !== FALSE )
{
    $publicPath = realpath($publicPath).'/';
}
else
{
    die('Your public folder path is not set correctly.');
}

define('SYS_PATH', str_replace('\\', '/', $systemPath));
define('APP_PATH', str_replace('\\', '/', $applicationPath));
define('PUB_PATH', str_replace('\\', '/', $publicPath));

require SYS_PATH . 'core/Hosselaar.php';

/* Start Hosselaar */
$Hosselaar = new system\core\Hosselaar();

$Hosselaar->run();